-
Notifications
You must be signed in to change notification settings - Fork 103
hotfix/prototype changes #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR is a hotfix addressing security issues related to prototype pollution by upgrading dependencies and removing the .includeOwner() API calls that were exposing user information. The changes also include corrections for non-existent package versions and modernization of Next.js patterns.
Key Changes
- Security Fix: Removed
.includeOwner()calls from Contentstack SDK queries to prevent information disclosure - Dependency Corrections: Fixed Next.js and related packages from non-existent v16.x to stable v15.x
- Next.js Modernization: Updated Link components to remove deprecated
legacyBehaviorprop, improved Script loading strategy
Reviewed changes
Copilot reviewed 15 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Corrected Next.js from v16.0.5 to v15.5.6 and updated dependencies to stable versions |
| package-lock.json | Updated lockfile to reflect corrected package versions and new dependencies |
| tsconfig.json | Added ES2017 target and included dev types directory |
| next.config.mjs | Added serverExternalPackages, image patterns, and webpack fallbacks for better compatibility |
| next-env.d.ts | Updated TypeScript references and documentation link |
| contentstack-sdk/index.js | Removed .includeOwner() calls for security, updated Live Preview SDK initialization to v4.x |
| components/tool-tip.tsx | Fixed clearInterval bug to clearTimeout, improved hooks usage with proper cleanup |
| components/section.tsx | Removed deprecated Link legacyBehavior wrapper |
| components/hero-banner.tsx | Removed deprecated Link legacyBehavior wrapper |
| components/header.tsx | Removed deprecated Link legacyBehavior wrapper |
| components/footer.tsx | Removed deprecated Link legacyBehavior wrapper |
| components/card-section.tsx | Removed deprecated Link legacyBehavior wrapper |
| components/blog-section.tsx | Removed deprecated Link legacyBehavior wrapper |
| components/blog-list.tsx | Removed deprecated Link legacyBehavior wrapper |
| components/archive-relative.tsx | Removed deprecated Link legacyBehavior wrapper |
| app/page.tsx | Updated state initialization and render condition |
| app/layout.tsx | Removed unnecessary async, reorganized structure, moved Script to proper location with lazyOnload strategy |
| app/blog/[post]/page.tsx | Minor formatting adjustment |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Amitkanswal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls check following comments
Amitkanswal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
hanoak20
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Hotfix to avoid security issues.